[SQL] az sql mi create/update: Add memory size in gb parameter#32466
[SQL] az sql mi create/update: Add memory size in gb parameter#32466
az sql mi create/update: Add memory size in gb parameter#32466Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| sql mi create | cmd sql mi create added parameter memory_size_in_gb |
||
| sql mi update | cmd sql mi update added parameter memory_size_in_gb |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR adds a memorySizeInGb parameter to the az sql mi create and az sql mi update commands, leveraging the 2024-08-01-preview API. This enables users to specify the memory size in gigabytes for SQL Managed Instances.
- Added
--memoryparameter to create and update commands for SQL Managed Instances - Implemented parameter handling in custom logic and parameter definitions
- Added comprehensive test coverage and documentation examples
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| test_sql_commands.py | Adds two new test classes to verify memory size parameter functionality in create and update scenarios |
| custom.py | Updates managed_instance_update function to handle memory_size_in_gb parameter and adds logic to set requested_logical_availability_zone to None |
| _params.py | Defines the memory_size_in_gb parameter type and registers it for both create and update commands |
| _help.py | Adds usage examples demonstrating the --memory parameter for create and update commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az sql mi create
az sql mi update
Description
Added memorySizeInGb parameter from the 2024-08-01-preview API to the az cli client. az sql mi create and update commands are affected.
Testing Guide
Added tests that test this new feature. Example of update command:
az sql mi update -g uroskrstic -n uroskrstic-flexi-test-azpowershell --memory 80 --gpv2 True
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.